package com.example.demo.mapper;

import com.example.demo.model.AuctionInfo;
import com.example.demo.model.AuctionRecord;
import com.example.demo.vo.AuctionVO;
import org.apache.ibatis.annotations.Mapper;
import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface AuctionMapper {
    List<AuctionVO> selectList();
    AuctionInfo selectById(Long id);
    int insert(AuctionInfo auctionInfo);
    int update(AuctionInfo auctionInfo);
    List<AuctionRecord> selectRecordsByAuctionId(Long auctionId);
    int insertRecord(AuctionRecord record);
    List<AuctionInfo> selectEndingAuctions();
    List<Long> selectOtherBidders(@Param("auctionId") Long auctionId, @Param("winnerId") Long winnerId);
    List<AuctionInfo> selectStartingAuctions();
    void updateStartingAuctionsStatus();
    void updateCurrentPrice(@Param("auctionId") Long auctionId, @Param("bidPrice") BigDecimal bidPrice);
} 